package com.rmuti.acm.string;

import java.util.Scanner;


public class TestString {
	
	public static void main(String args[]) throws Exception {
		String str = "test test1 test2";
		System.out.println(str.replaceAll(" ", ""));
	}

	public static void showPattern(String st, String chars) {
		if (chars.length() <= 1)
			System.out.println(st + chars);
		else
			for (int i = 0; i < chars.length(); i++) {
				try {
					String newString = chars.substring(0, i) + chars.substring(i + 1);
					showPattern(st + chars.charAt(i), newString);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
	}
}
